package hw_7_24;

public class Enum_Demo2 {
    public enum UnitEnum{
        U1("第一单元"),
        U2("第二单元"),
        U3("第三单元");
        private String learningTarget;

        UnitEnum() {
        }

        UnitEnum(String learningTarget) {
            this.learningTarget = learningTarget;
        }

        public String getLearningTarget() {
            return learningTarget;
        }

        public void setLearningTarget(String learningTarget) {
            this.learningTarget = learningTarget;
        }
    }

    public static void main(String[] args) {
        UnitEnum[] values = UnitEnum.values();
        for (UnitEnum value : values) {
            System.out.print(value.getLearningTarget());
            switch (value){
                case U1 -> {
                    System.out.print("打基础");
                }
                case U2 -> {
                    System.out.print("可以胜任Java程序开发");
                }
                case U3 -> {
                    System.out.print("可以胜任企业级Java开发");
                }
            }
            System.out.println();
        }
    }
}
